1. Field of the Invention
The present invention relates to computer systems and, more particularly, to peripheral buses for a computer system.
2. Description of the Related Art
Computer systems typically include a bus over which data and control signals are exchanged with peripheral devices. These buses are often categorized as either parallel buses or serial buses. Parallel buses include multiple data lines, whereas serial buses include a single data line (or a differential pair of lines). Examples of parallel buses are Interface Standard Association (ISA) and Peripheral Component Interface (PCI). Examples of serial buses are Apple Desktop Bus (ADB), Access.bus, IEEE P1394, Concentration Highway Interface (CHI), and GeoPort.
Recently, an improved serial bus known as Universal Serial Bus (USB) has been developed. USB is an industry standard extension to the personal computer architecture with a focus on Computer Telephony Integration (CTI), consumer and productivity applications. The USB is described in a Universal Serial Bus Specification, Revision 1.0, dated Jan. 15, 1996, which is hereby incorporated by reference. Although the USB specification document explains USB in detail, below the features and operation of USB are summarized for the reader's benefit.
A range of data traffic can be serviced over a USB bus. The transfer rate for the USB bus is up to 12 Mbs. A USB bus also comprehends mid-speed and low-speed data ranges. Typically, mid-speed data transfers are isochronous and low-speed data transfers come from interactive devices. USB is primarily designed as a desktop bus but is also suitable for the mobile environment. USB has various advantages, including: easy peripheral expansion, low cost transfer rate up to 12 Mbs which can support real-time data for voice, audio and compressed video, protocol flexibility for mixed-mode isochronous data transfers and asynchronous messaging, standardized interface, and suitable for various computer configurations and form factors.
USB is a cable bus that supports data exchange between a host computer and a wide range of simultaneously accessible peripherals. The peripherals attached to a USB share the bandwidth of the USB through a host scheduled token based protocol. The USB specification allows peripherals to be attached, configured, used and detached while the host and other peripherals are in operation. Such is often referred to as dynamic (or hot) attachment and removal.
A USB bus connects USB devices with a USB host. There is only one USB host on any USB system. A host controller interfaces the USB bus to the host computer system. The host controller may be implemented in a combination of hardware, firmware or software. The USB physical interconnect is a tiered star topology. A hub is at the center of each star. Each wire segment is a point-to-point connection between the host and a hub or function, or a hub connected to another hub or function.
USB devices are hubs or functions. Hubs provide additional attachment points to the USB. Functions provide capabilities to the system, such as printing, joystick, speakers, or ISDN connection. All the USB devices present a standard USB interface in terms of their comprehension of the USB protocol, their response to standard operations such as configuration and reset, and their standard capability descriptive information.
A USB bus transfers signals and power over a cable having four (4) wires. The signaling occurs over two (2) wires in point-to-point segments. The maximum length of a cable segment is five (5) meters. The signals on each segment are differentially driven into a cable of 90Ω intrinsic impedance by a differential transmitter. A differential receiver is used to receive the signals at the other end of the cable and has an input sensitivity of at least 200 mV and sufficient common mode rejection.
There are two modes of signaling. The USB full speed signaling bit rate is 12 Mbs. A limited capability of low speed signaling mode is also defined at 1.5 Mbs. Both modes can be simultaneously supported in the same USB system by mode switching between transfers in a device transparent manner. The low speed mode is defined to support a limited number of low bandwidth devices (e.g., mouse), since more general use would degrade the bus utilization. A clock is transmitted encoded along with the differential data. A SYNC field also proceeds each packet to allow the receiver (s) to synchronize their bit recovery clocks.
The USB specification also covers power management aspects. Each USB segment provides a limited amount of power over the cable. The host supplies power for use by USB devices that are directly connected to the host. In addition, any USB device may have its own power supply. USB devices that rely totally on the power from the cable are called bus-powered devices. In contrast, those USB devices that have an alternate source of power are called self-powered devices. A USB hub in turn supplies power for its connected USB devices. The USB specification permits bus-power hubs within certain constraints of topology.
A USB host has a power management system which is independent from that of the USB. The USB system software interacts with the host's power management system to handle system power events such as SUSPEND or RESUME. Additionally, USB devices can carry USB-defined power management information which allows them to be power managed by system software or generic device drivers.
According to the USB bus protocol, all bus transactions involve the transmission of up to three (3) packets. Each transaction begins when the host controller, on a scheduled basis, sends a USB packet describing the type and direction of the transaction, the USB device address, and endpoint number. The packet is referred to as the Token Packet. The USB device that is addressed selects itself by decoding the appropriate address fields. In a given transaction, data is transferred either from the host to a device or from a device to the host. The direction of data transfer is specified in the token packet. The source of the transaction then sends a Data Packet or indicates it has no data to transfer. The destination in general responds with a Handshake Packet indicating whether the transfer was successful.
The USB data transfer model between a source or destination on the host and an endpoint on a device is referred to as a pipe. There are two types of pipes: stream and message. Stream data has no USB defined structure while message data does. Additionally, pipes have associations of data bandwidth, transfer service type, and endpoint characteristics such as directionality and buffer sizes. Pipes come into existence when a USB device is configured. One message pipe, Control Pipe 0, always exists once a device is powered in order to provide access to the device's configuration, status and control information. The transaction schedule allows flow control for some stream mode pipes. At the hardware level, this prevents buffers from underpin or overrun situations by using a NACK handshake to throttle the data rate. The token for a NACK'ed transaction is reissued when the bus time is available. The flow control mechanism permits the construction of flexible schedules that accommodate concurrent servicing of a heterogeneous mix of stream mode pipes. Thus, multiple stream mode pipes can be serviced at different intervals and with packets of different sizes.
The USB supports USB devices attaching to and detaching from the USB at any point in time. Consequently, enumerating the USB is an ongoing activity that must accommodate dynamic changes in the physical bus topology.
All USB devices attach to the USB via a port on specialized USB devices known as hubs. Hubs indicate the attachment or removal of a USB device in its per port status. The host queries the hub to determine the reason for the notification. The hub then responds by identifying the port used to attach the USB device. Thereafter, the host enables the port and addresses the USB device with a control pipe using the USB Default Address. All USB devices are addressed using the USB Default Address when initially connected or after they have been reset.
The host determines if the newly attached USB device is a hub or a function and assigns a unique USB address to the USB device. The host establishes a control pipe for the USB device using the assigned USB address and endpoint number zero (0). If the attached USB device is a hub and USB devices are attached to its ports, then the above procedure is followed for each of the attached USB devices. If the attached USB device is a function, then attachment notifications will be dispatched by the USB software to interested host software.
When a USB device has been removed from one of its ports, the hub automatically disables the port and provides an indication of device removal to the host. Then, the host removes knowledge of the USB device from any host data structures. If the removed USB device is a hub, then the removal process must be performed for all of the USB devices that were previously attached to the hub. If the removed USB device is a function, removal notifications are sent to the interested software.
Bus enumeration is the activity that identifies and addresses devices attached to a bus. For many buses, this is done at start up time and the information collected is static. However, since the USB allows the USB devices to be attached or detached from the USB at any time, bus enumeration for the USB bus is an on-going activity. Additionally, bus enumeration for the USB also includes detection and processing of removals.
USB supports functional data and control exchange between the USB host and a USB device in either a unidirectional fashion or a bidirectional fashion. Data transfers take place between host software and a particular endpoint on a USB device. A given USB device may support multiple data transfer endpoints. The USB host treats communications with any endpoint of a USB device independently from any other endpoint. Such associations between the host software and a USB device endpoint are called pipes. As an example, a given USB device could have an endpoint which would support a pipe for transporting data to the USB device and another endpoint which would support a pipe for transporting data from the USB device.
The USB specification supports four basic types of data transfers: control transfers, bulk transfers, interrupt transfers and isochronous transfers. Control data transfers are used by USB software to configure devices when they are first attached. Bulk data transfers typically consist of larger amounts of data such as used for printers or scanners. Interrupt data transfers are small, spontaneous data transfers from a device The data being transferred is referred to as interrupt data, and such data may be presented for transfer by a device at any time. Interrupt data typically consists of event notification, characters, or coordinates that are organized as one or more bytes. isochronous data transfers are continuous and real-time in creation, delivery and consumption. Timing related information is implied by the steady state at which isochronous data is received and transferred. Isochronous data must be delivered at the rate received to maintain its timing. In addition to delivery rate, isochronous data must also be sensitive to delivery delays. For isochronous pipes, the bandwidth required is typically based upon the sampling characteristics of the associated function. The latency required is related to the buffering available at each endpoint. The timely delivery of isochronous data is ensured at the expense of potential transient losses in the data stream. In other words, any transmission errors are not corrected by hardware mechanisms such as retries. In practice, the core error rate of the USB is expected to be small enough not to be an issue. USB isochronous data streams are allocated to a dedicated portion of USB bandwidth to ensure that data can be delivered at the desired rate. The USB is also designed for minimal delay of isochronous data transfers.
The USB bandwidth is allocated among pipes. The USB allocates bandwidth for some pipes when a pipe is established. USB devices are required to provide some buffering of data. The goal for the USB architecture is to ensure that buffering induced hardware delays are bounded to within a few milliseconds. The bandwidth capacity of the USB can be allocated to the different data streams. The bandwidth allocation is blocking so that further pipe allocations are denied or blocked if they would disturb preexisting bandwidth or latency allocations. Whenever a pipe is closed, the allocated bandwidth is freed up and may be reallocated to another pipe.
USB devices are divided into device classes such as hub, locator, or text devices. USB devices are required to carry information for self-identification and generic configuration. All USB devices are accessed by a unique USB address. Bach USB device additionally supports one or more endpoints with which the host may communicate. All USB devices must support especially designated endpoint zero (0) to which the USB device's USB control pipe will be attached. The information needed to completely describe the USB device is associated with the endpoint zero (0). Additionally, each USB device carries USB control and status information.
Two major divisions of the device classes exist: hubs and functions. Only hubs have the ability to provide additional USB attachment points. Functions, on the other hand, provide additional capabilities to the host.
Hubs are a key element in the plug-and-play architecture of USB. Hubs serve to simplify USB connectivity from the user's perspective and provide robustness at low cost and low complexity. Hubs are wiring concentrators that enable multiple attachment characteristics of USB. Attachment points on the hubs are referred to as ports. Each hub converts a single attachment point into multiple attachment points. The upstream port of a hub connects the hub towards the host. Each of the other downstream ports of a hub allows connection to another hub or function. Hubs can detect attach and detach at each downstream port and enable the distribution of power to the downstream devices. Each downstream port can be individually enabled and configured as either full or low speed. The hub also isolates low speed ports from full speed signaling ports.
A hub consists of two portions: the hub controller and the hub repeater. The hub repeater is a protocol controlled switch between the upstream port and the downstream ports. It also has hardware support for reset and suspense/resume signaling. The hub controller provides the interface registers that allow communication to/from the host. Hub specific status and control commands permit the host to configure a hub and to monitor and control its ports.
A function is a USB device that is able to transmit or receive data or control information over the bus. A function is typically implemented as a separate peripheral device with a cable that plugs into a port on a hub. However, a physical package may implement multiple functions and an embedded hub with a single USB cable. This is known as a compound device. Each function contains configuration information that describes its capabilities and resource requirements. Before a function can be used, it must be configured by the host. This configuration includes allocating USB bandwidth and selecting function specific configuration options. Examples of functions are: locator devices such as a mouse, tablet, or light pen; input devices such as a keyboard; output devices such as a printer; and telephony adapters such as an ISDN adapter.
The USB host interacts with the USB devices through the host controller. The host and its associated host controller are responsible for managing the use of the USB. Specifically, the host is responsible for detecting the attachment and removal of USB devices, managing control flow between the host and USB devices, managing data flow between the host and USB devices, collecting status and activity statistics, and providing a limited amount of power to attached USB devices.
The USB system software on the host manages interactions between the USB devices and the host-based device software. The general areas of interactions between the USB system software and the device software are: device enumeration and configuration, isochronous data transfers, asynchronous data transfers, power management, and device and bus management information.
FIG. 1 is a block diagram of a conventional computer system 100 that utilizes a Universal Serial Bus (USB). The computer system 100 includes a personal computer 102 that includes among other things a USB port 104. A USB bus 106 connects the USB port 104 to a USB hub 108. The USB bus 106 is a cable consisting of four (4) wires. The USB hub 108 provides a plurality of USB ports 110, 112 and 114. Each of these ports 110, 112 and 114 are capable of coupling to a USB device or another USB hub. Specifically, as in the example illustrated in FIG. 1, the USB port 110 connects to a printer 116 through a USB bus link 118. The USB port 112 connects to an input device 120 through a USB bus link 122. As an example, the input device could be a mouse, a keyboard, a tablet, etc.
The USB bus 106 of the computer system 100 thus provides an electrical connection over which control and data information can pass between the personal computer 102 and the various peripheral devices such as the printer 116 and the input device 120. According to the USB specification, the length of the cable associated with the USB bus 106 has a maximum length of five (5) meters. The length of the cable for the USB bus is restricted to not more than five (5) meters primarily for electrical design reasons.
Accordingly, to use USB buses, the personal computer 102 is required to be within 5 meters of a USB hub and/or the USB devices. However, it is not always easy to maneuver a personal computer to within five (5) meters of the desired peripheral device. This physical constraint on computer systems desiring to use a USB bus is therefore problematic and unsatisfactory in many cases.
Thus, there is a need for improved ways to utilize a USB bus without being burdened by the five (5) meter limitation on cable length for a USB bus.